package com.honglang.module.wish.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.honglang.module.user.entity.User;

@Entity
@Table(name="wish")
public class Wish {

	/**
	 * @uml.property  name="id"
	 */
	private Integer id;

	/**
	 * @uml.property  name="title"
	 */
	private String title;

	/**
	 * @uml.property  name="content"
	 */
	private String content;

	/** 
	 * @uml.property name="author"
	 * @uml.associationEnd aggregation="shared" inverse="wish:com.honglang.entity.User"
	 */
	private User author;

	/** 
	 * @uml.property name="wishDate"
	 */
	private Date wishDate;

	/**
	 * @uml.property  name="isArcheve"
	 */
	private boolean isArcheve;

	/**
	 * Getter of the property <tt>title</tt>
	 * @return  Returns the title.
	 * @uml.property  name="title"
	 */
	@Column
	public String getTitle() {
		return title;
	}

	/**
	 * Setter of the property <tt>title</tt>
	 * @param title  The title to set.
	 * @uml.property  name="title"
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * Getter of the property <tt>content</tt>
	 * @return  Returns the content.
	 * @uml.property  name="content"
	 */
	@Column
	public String getContent() {
		return content;
	}

	/**
	 * Setter of the property <tt>content</tt>
	 * @param content  The content to set.
	 * @uml.property  name="content"
	 */
	public void setContent(String content) {
		this.content = content;
	}

	/** 
	 * Getter of the property <tt>author</tt>
	 * @return  Returns the author.
	 * @uml.property  name="author"
	 */
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn
	public User getAuthor() {
		return author;
	}

	/** 
	 * Getter of the property <tt>wishDate</tt>
	 * @return  Returns the wishDate.
	 * @uml.property  name="wishDate"
	 */
	@Column
	public Date getWishDate() {
		return wishDate;
	}

	/** 
	 * Setter of the property <tt>wishDate</tt>
	 * @param wishDate  The wishDate to set.
	 * @uml.property  name="wishDate"
	 */
	public void setWishDate(Date wishDate) {
		this.wishDate = wishDate;
	}

	/**
	 * Getter of the property <tt>isArcheve</tt>
	 * @return  Returns the isArcheve.
	 * @uml.property  name="isArcheve"
	 */
	@Column
	public boolean isIsArcheve() {
		return isArcheve;
	}

	/**
	 * Setter of the property <tt>isArcheve</tt>
	 * @param isArcheve  The isArcheve to set.
	 * @uml.property  name="isArcheve"
	 */
	public void setIsArcheve(boolean isArcheve) {
		this.isArcheve = isArcheve;
	}

	/** 
	 * Setter of the property <tt>author</tt>
	 * @param author  The author to set.
	 * @uml.property  name="author"
	 */
	public void setAuthor(User author) {
		this.author = author;
	}

	/**
	 * Getter of the property <tt>id</tt>
	 * @return  Returns the id.
	 * @uml.property  name="id"
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public Integer getId() {
		return id;
	}

	/**
	 * Setter of the property <tt>id</tt>
	 * @param id  The id to set.
	 * @uml.property  name="id"
	 */
	public void setId(Integer id) {
		this.id = id;
	}

}
